package com.example.lyl.testanimation;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

/**
 * Created by lyl on 2017/3/1.
 */

public class Four extends Activity {
    private TextView textView;
    CloseActivity close;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.second);
        textView= (TextView) findViewById(R.id.text);
        textView.setText("这是第四个页面");
        textView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(Four.this, "关闭前两个页面", Toast.LENGTH_SHORT).show();


                SlefActivityManager.getInstance().closeActivity(1);
                SlefActivityManager.getInstance().closeActivity(2);
            }
        });
    }


    interface CloseActivity{
        void finishActivity();
    }
}
